package com.igoal.entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Type;

@Entity
@Table(name="admin_member_mail")
public class MemberMail extends BaseObject {
	
	private Long id;
	private String name;
	private String subject;
	private String body;
	private Date scheduledDate;
	private String receptionGroups;
	private boolean igoalDB;
	private boolean marketingDB;
	private Integer sendingStatus;
	private Integer priority;
	private Long totalEmailSent;
	private Long totalEmail;
	private Date createDate;
	private Date updateDate;
	private DataStatus status;	

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(nullable=true)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column
	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	@Column
	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	@Column(name="scheduled_date")
	public Date getScheduledDate() {
		return scheduledDate;
	}

	public void setScheduledDate(Date scheduledDate) {
		this.scheduledDate = scheduledDate;
	}

	@Column(name="reception_groups")
	public String getReceptionGroups() {
		return receptionGroups;
	}

	public void setReceptionGroups(String receptionGroups) {
		this.receptionGroups = receptionGroups;
	}

	@Column(name="igoal_db")
	@Type(type = "yes_no")
	public boolean isIgoalDB() {
		return igoalDB;
	}

	public void setIgoalDB(boolean igoalDB) {
		this.igoalDB = igoalDB;
	}

	@Column(name="marketing_db")
	@Type(type = "yes_no")
	public boolean isMarketingDB() {
		return marketingDB;
	}

	public void setMarketingDB(boolean marketingDB) {
		this.marketingDB = marketingDB;
	}

	@Column(name="total_email_sent")
	public Long getTotalEmailSent() {
		return totalEmailSent;
	}

	public void setTotalEmailSent(Long totalEmailSent) {
		this.totalEmailSent = totalEmailSent;
	}	

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "cdate", nullable = false, length = 19)
	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date date) {
		this.createDate = date;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(nullable = false, name = "mdate")
	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date date) {
		this.updateDate = date;
	}

	@Enumerated(EnumType.STRING)
	@Column(name = "status", nullable = false, length = 50)
	public DataStatus getStatus() {
		return this.status;
	}

	public void setStatus(DataStatus status) {
		this.status = status;
	}
	
	@Column
	public Integer getPriority() {
		return priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	@Column(name="total_email")
	public Long getTotalEmail() {
		return totalEmail;
	}

	public void setTotalEmail(Long totalEmail) {
		this.totalEmail = totalEmail;
	}

	@Column(name="sending_status")
	public Integer getSendingStatus() {
		return sendingStatus;
	}

	public void setSendingStatus(Integer sendingStatus) {
		this.sendingStatus = sendingStatus;
	}

	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}
}
